How to convert ByteString to [Word8] in Haskell?

Posted by bodacydo on Stack Overflow See other posts from Stack Overflow or by bodacydo
Published on 2010-05-06T00:52:26Z Indexed on 2010/05/06 0:58 UTC
Read the original article Hit count: 386

Filed under:

I am dealing with ByteStrings and at this one place I need to use [Word8] but I have a ByteString. How do I convert a ByteString to [Word8] list?

I tried unpack function from ByteString library but it returned a [Char] list rather than [Word8] list. Do I need to take this step and convert it first to [Char] list and only to [Word8] list? If so, how do I do that.

Please advise the most efficient method!

Thank you!

© Stack Overflow or respective owner

Related posts about haskell